{__NOLAYOUT__}<style>
.typeTable tr td{padding:  5px;}
</style>
{switch name="type" }
{case value="text" }
<table class="typeTable" cellpadding="2" cellspacing="1" >
    <tr>
        <td>默认值</td>
        <td> <input type="text" class="form-control"  name="setup[default]" value="{$fieldInfo.setup.default?$fieldInfo.setup.default:''}" /></td>
    </tr>
    <input type="hidden" name="setup[fieldtype]" value="varchar"/>
</table>
{/case}
{case value="textarea" }
<table class="typeTable" cellpadding="2" cellspacing="1" width="100%">
	<tr>
        <td>字段类型</td>
        <td>
            <select class="form-control" name="setup[fieldtype]">
                <option value="mediumtext" {$fieldInfo.setup.fieldtype=='mediumtext'?'selected':''}>MEDIUMTEXT</option>
                <option value="text" {$fieldInfo.setup.fieldtype=='text'?'selected':''}>TEXT</option>
            </select>
        </td>
    </tr>
    <tr>
        <td>默认值</td>
        <td> <input type="text" class="form-control" name="setup[default]" value="{$fieldInfo.setup.default?$fieldInfo.setup.default:''}"/></td>
    </tr>
</table>
{/case}
{case value="editor"}
<table class="typeTable" cellpadding="2" cellspacing="1" width="100%">
    <tr>
        <td width="140">编辑器类型：</td>
        <td>
            <select name="setup[edittype]" class="form-control" >
                <!--<option value="wangEditor" {$fieldInfo.setup.edittype=='wangEditor'?'selected':''}>wangEditor</option>-->
                <option value="ckeditor" {$fieldInfo.setup.edittype=='ckeditor'?'selected':''}>ckeditor</option>
                <!--<option value="UEditor" {$fieldInfo.setup.edittype=='UEditor'?'selected':''}>UEditor</option> -->
            </select>
        </td>
    </tr>
</table>
{/case}
{case value="select" }
<table class="typeTable" cellpadding="2" cellspacing="1" width="100%">
    <tr>
        <td width="120">选项列表:<br>例: <font color="red">选项名称|值</font><br>一行一个</td>
        <td>
            <textarea  name="setup[options]" rows="5" cols="40" class="form-control">{$fieldInfo.setup.options?$fieldInfo.setup.options:''}</textarea>
        </td>
    </tr>
    <tr>
        <td>字段类型</td>
        <td>
            <select name="setup[fieldtype]"> 
                <option value="varchar" {$fieldInfo.setup.fieldtype=='varchar'?'selected':''}>字符 VARCHAR</option>
                <option value="tinyint" {$fieldInfo.setup.fieldtype=='tinyint'?'selected':''}>整数 TINYINT(3)</option>
                <option value="smallint" {$fieldInfo.setup.fieldtype=='smallint'?'selected':''}>整数 SMALLINT(5)</option>
                <option value="mediumint" {$fieldInfo.setup.fieldtype=='mediumint'?'selected':''}>整数 MEDIUMINT(8)</option>
                <option value="int" {$fieldInfo.setup.fieldtype=='int'?'selected':''}>整数 INT(10)</option>

            </select>
        </td>
    </tr>
    <tr>
        <td>默认值</td>
        <td> <input type="text" size="5" class="form-control"  name="setup[default]" value="{$fieldInfo.setup.default?$fieldInfo.setup.default:''}"/></td>
    </tr>
</table>
{/case}
{case value="radio"}
<table class="typeTable" cellpadding="2" cellspacing="1" width="100%">
    <tr>
        <td width="120">选项列表:<br>例: <font color="red">选项名称|值</font><br>一行一个</td>
        <td>
            <textarea  name="setup[options]" rows="5" cols="40" class="form-control">{$fieldInfo.setup.options?$fieldInfo.setup.options:''}</textarea>
        </td>
    </tr>
    <tr>
        <td>字段类型</td>
        <td>
            <select name="setup[fieldtype]">
                <option value="varchar" {$fieldInfo.setup.fieldtype=='varchar'?'selected':''}>字符 VARCHAR</option>
                <option value="tinyint" {$fieldInfo.setup.fieldtype=='tinyint'?'selected':''}>整数 TINYINT(3)</option>
                <option value="smallint" {$fieldInfo.setup.fieldtype=='smallint'?'selected':''}>整数 SMALLINT(5)</option>
                <option value="mediumint" {$fieldInfo.setup.fieldtype=='mediumint'?'selected':''}>整数 MEDIUMINT(8)</option>
                <option value="int" {$fieldInfo.setup.fieldtype=='int'?'selected':''}>整数 INT(10)</option>
            </select>
        </td>
    </tr>
    <tr>
        <td>默认值</td>
        <td> <input type="text" size="5" class="form-control"  name="setup[default]" value="{$fieldInfo.setup.default?$fieldInfo.setup.default:''}" /></td>
    </tr>
</table>
{/case}
{case value="checkbox"}
<table class="typeTable" cellpadding="2" cellspacing="1" width="100%">
    <tr>
        <td width="120">选项列表:<br>例: <font color="red">选项名称|值</font><br>一行一个</td>
        <td>
            <textarea  name="setup[options]" rows="5" cols="40" class="form-control">{$fieldInfo.setup.options?$fieldInfo.setup.options:''}</textarea>
        </td>
    </tr>
    <tr>
        <td>字段类型</td>
        <td>
            <select name="setup[fieldtype]">
                <option value="varchar" {$fieldInfo.setup.fieldtype=='varchar'?'selected':''}>字符 VARCHAR</option>
                <option value="tinyint" {$fieldInfo.setup.fieldtype=='tinyint'?'selected':''}>整数 TINYINT(3)</option>
                <option value="smallint" {$fieldInfo.setup.fieldtype=='smallint'?'selected':''}>整数 SMALLINT(5)</option>
                <option value="mediumint" {$fieldInfo.setup.fieldtype=='mediumint'?'selected':''}>整数 MEDIUMINT(8)</option>
                <option value="int" {$fieldInfo.setup.fieldtype=='int'?'selected':''}>整数 INT(10)</option>
            </select>
        </td>
    </tr>
    <tr>
        <td>默认值</td>
        <td> <input type="text" size="5" class="form-control"  name="setup[default]" value="{$fieldInfo.setup.default?$fieldInfo.setup.default:''}" /></td>
    </tr>
</table>
{/case}
{case value="image"}
<table class="typeTable" cellpadding="2" cellspacing="1" width="100%">
    <tr>
        <td>允许上传的图片类型</td>
        <td><input type="text" name="setup[upload_allowext]" value="{$fieldInfo.setup.upload_allowext?$fieldInfo.setup.upload_allowext:'jpg|jpeg|gif|png'}" class="form-control"></td>
    </tr>
</table>
{/case}
{case value="images"}
<table class="typeTable" cellpadding="2" cellspacing="1" width="100%">
    <tr>
        <td>允许上传的图片类型</td>
        <td><input type="text" name="setup[upload_allowext]" value="{$fieldInfo.setup.upload_allowext?$fieldInfo.setup.upload_allowext:'jpg|jpeg|gif|png'}" class="form-control"></td>
    </tr>
</table>
{/case}
{case value="file"}
<table class="typeTable" cellpadding="2" cellspacing="1" width="100%">
    <tr>
        <td>允许上传的文件类型</td>
        <td><input type="text" name="setup[upload_allowext]" value="{$fieldInfo.setup.upload_allowext?$fieldInfo.setup.upload_allowext:'zip|rar|doc|ppt'}" class="form-control"></td>
    </tr>
</table>
{/case}
{case value="number"}
<table class="typeTable" cellpadding="2" cellspacing="1" width="100%">
    <tr>
        <td>是否包括负数：</td>
        <td>
        	{if $fieldInfo.setup.numbertype}
            <input type="checkbox" id="" name = "setup[numbertype]" value="1" {$fieldInfo.setup.numbertype? 'checked' : ''} title="不包括负数"/>
            {else}
            <input type="checkbox" id="" name = "setup[numbertype]" value="1" checked title="不包括负数"/>
            {/if}
           
        </td>
    </tr>
    <tr>
        <td>小数位数：</td>
        <td>
            <select class="form-control" name="setup[decimaldigits]">
                <option value="0" {$fieldInfo.setup.decimaldigits=='0'?'selected':''}>0</option>
                <option value="1" {$fieldInfo.setup.decimaldigits=='1'?'selected':''}>1</option>
                <option value="2" {$fieldInfo.setup.decimaldigits=='2'?'selected':''}>2</option>
                <option value="3" {$fieldInfo.setup.decimaldigits=='3'?'selected':''}>3</option>
                <option value="4" {$fieldInfo.setup.decimaldigits=='4'?'selected':''}>4</option>
                <option value="5" {$fieldInfo.setup.decimaldigits=='5'?'selected':''}>5</option>
            </select>
        </td>
    </tr>
    <tr>
        <td>默认值</td>
        <td>
            <input type="text" name="setup[default]" size="40" class="form-control" value="{$fieldInfo.setup.default?$fieldInfo.setup.default:''}">
        </td>
    </tr>
</table>
{/case}
{case value="datetime"}
{/case}
{case value="typeid"}
<table class="typeTable" c cellpadding="2" cellspacing="1" width="100%">
    <tr>
        <td width="120">选项类型</td>
        <td>
            <input type="radio" name="setup[inputtype]" value="checkbox" title="复选框">
            <input type="radio" name="setup[inputtype]" value="select" title="下拉列表框">
            <input type="radio" name="setup[inputtype]" value="radio" checked title="单选框">
        </td>
    </tr>
    <tr>
        <td>字段类型</td>
        <td>
            <select name="setup[fieldtype]"  onchange="javascript:numbertype(this.value);">
                <option value="varchar" selected>字符 VARCHAR</option>
                <option value="tinyint" >整数 TINYINT(3)</option>
                <option value="smallint" >整数 SMALLINT(5)</option>
            </select>
            <span id="numbertype" style="display:none;"  >
                <input type="checkbox" id="" name = "setup[numbertype]" value="1" checked title="不包括负数"/>
            </span>
        </td>
    </tr>
    <tr>
        <td>顶级类别ID</td>
        <td> <input type="text" class="input-text layui-input" size="5"  name="setup[default]" value="" /></td>
    </tr>
</table>
{/case}
{case value="posid"}
{/case}
{case value="files"}
<table class="typeTable" cellpadding="2" cellspacing="1" width="100%">

</table>
{/case}
{case value="tag" }
<table class="typeTable" cellpadding="2" cellspacing="1" >
    <input type="hidden" name="setup[fieldtype]" value="varchar"/>
</table>
{/case}
{default /}
{/switch}